<%--
  Created by IntelliJ IDEA.
  User: 86180
  Date: 2020/12/21
  Time: 9:33
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>首页</title>
    <%@include file="/pages/common/head.jsp"%>
    <STYLE>
      body{
        background: linear-gradient(to bottom,skyblue,#6a6da9,#6950a1);
        background-size: auto;
        margin-top: 5%;
      }

    </STYLE>
  </head>
  <script type="text/javascript">
    $(function (){
    <c:if test="${not empty requestScope.alert}">
    alert("${requestScope.alert}")
    </c:if>

      $("#call").click(function () {

        $('#addModal').modal({
          backdrop:"static"
        });
      });


    });

  </script>
  <body>

  <br>

  <div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" >联系老师</h4>
        </div>
        <div class="modal-body">
          <form class="form-horizontal" action="teacherServlet?action=sendmessage" method="post">
            <div class="form-group">
              <label for="input1" class="col-sm-2 control-label">内容</label>
              <div class="col-sm-10">
                <input type="text" name="message" class="form-control" id="input1" value="">
              </div>
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
              <button type="submit" class="btn btn-primary">发送</button>
            </div>
          </form>
        </div>

      </div>
    </div>
  </div>





  <div class="row">
    <div class="col-md-8  col-md-offset-2">
      <table class="table table-hover">

        <c:if test="${not empty requestScope.student}">
          <tr>
            <td>学生学号</td>
            <td>学生姓名</td>
            <td>数学成绩</td>
            <td></td>
            <td colspan="2">操作</td>
          </tr>
                <tr>
                  <td>${student.sid}</td>
                  <td>${student.name}</td>
                  <td>${student.math}</td>
                  <td> <a class="btn btn-danger btn-primary "   id="call"  role="button">
                    <span class="glyphicon glyphicon-user" aria-hidden="true"></span>
                    联系老师
                  </a></td>
                </tr>
        </c:if>

      </table>
    </div>
  </div>

  </body>
</html>
